source("c:/r/qserver.r")
c <- open_connection()
execute(c,"\\l load_sdr.q")
sdr_raw <- execute(c,"select from SDR_RAW")
sdr_final <- execute(c, "select from SDR_FINAL")
timeoffset_sdr <- as.POSIXct(strptime("2015-03-03 00:00:00", "%Y-%m-%d %H:%M:%S"))
sdr_final <-subset(sdr_final, EXECUTION_TIMESTAMP >= timeoffset_sdr)
sdr_final <- subset(sdr_final , TAXONOMY == 'Credit:Index:CDX:CDXIG')
sdr_final <- subset(sdr_final , EXECUTION_VENUE == 'ON')
sdr_final$timestamp<- as.POSIXct(sdr_final$EXECUTION_TIMESTAMP, format="%H:%M:%S")
sdr_final <- sdr_final[order(sdr_final$timestamp),]
plot(as.POSIXct(sdr_final$timestamp, format="%H:%M:%S"), sdr_final$PRICE_NOTATION, type="l", xlab = " Event Time ", ylab = "Trade Price", col='red')
